package syscore

import (
	"github.com/EDDYCJY/go-gin-example/controllers/syscore"
	"github.com/gin-gonic/gin"
)

// 初始化路由的函数 注意首字母大写
func SyscoreRouter(r *gin.Engine) {
	// 默认引擎
	apiv1 := r.Group("/api/syscore")
	// apiv1.Use(jwt.JWT())
	{
		//首页
		apiv1.GET("/home", syscore.Home)

		//获取机构列表
		apiv1.GET("/get_institution", syscore.GetInstitution)
		//添加机构
		apiv1.POST("/institution", syscore.AddInstitution)
		//更新机构
		apiv1.PUT("/institution/:id", syscore.EditInstitution)
		//删除机构
		apiv1.DELETE("/institution/:id", syscore.DeleteInstitution)

		//获取机构列表
		apiv1.GET("/goods", syscore.GetGoods)

		//获取机构列表
		apiv1.GET("/streamer", syscore.GetStreamer)
	}
}
